<template>
  <!-- 详情 -->
  <el-dialog title="车辆备案详情" :visible.sync="dialogVisible" width="50%" append-to-body :close-on-click-modal="false"
    :before-close="closedialog">
    <el-descriptions :column="2" border>
      <el-descriptions-item>
        <template slot="label">
          车辆海关编号
        </template>
        {{form.veCustomsNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          主管海关
        </template>
        {{form.customsCode}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所代码
        </template>
        {{form.fieldCode}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所名称
        </template>
        {{form.fieldName}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          车架号
        </template>
        {{form.frameNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          境内车牌号
        </template>
        {{form.domesticVehicleNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          境外车牌号
        </template>
        {{form.abroadVehicleNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          空车重量
        </template>
        {{form.selfWt}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          车辆类型
        </template>
        <dict-tag :options="dict.type.sys_vehicle_type" :value="form.vehicleType" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          备案类型
        </template>
        {{form.regType}}
          <dict-tag :options="dict.type.fee_config_vehicle_type" :value="form.regType" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          IC卡号
        </template>
        {{form.cardNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          电子车牌
        </template>
        {{form.rfid}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          司机姓名
        </template>
        {{form.driverName}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          批文有效期
        </template>
        {{form.expirationDate}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建人
        </template>
        {{form.createBy}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建时间
        </template>
        {{form.createTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          修改人
        </template>
        {{form.updateBy}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          修改时间
        </template>
        {{form.updateTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申报状态
        </template>
        <dict-tag :options="dict.type.vehicle_decl_status" :value="form.declStatus" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          使用状态
        </template>
        <dict-tag :options="dict.type.use_status" :value="form.useStatus" />
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申报日期
        </template>
        {{form.declTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申报人
        </template>
        {{form.declBy}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          申报重试次数
        </template>
        {{form.declRetryNum}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          审核时间
        </template>
        {{form.auditTime}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          审核意见
        </template>
        {{form.auditRemark}}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center;">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import {
    getPreVehicleRecord
  } from "@/api/billsdecl/preVehicleRecord";
  export default {
    props: {
      dict: {}
    },
    data() {
      return {
        //显示详情
        dialogVisible: false,
        form: {
          id: null,
          veCustomsNo: null,
          customsCode: null,
          fieldCode: null,
          fieldName: null,
          frameNo: null,
          domesticVehicleNo: null,
          abroadVehicleNo: null,
          selfWt: null,
          vehicleType: null,
          regType: null,
          cardNo: null,
          rfid: null,
          driverName: null,
          expirationDate: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null,
          declStatus: null,
          useStatus: null,
          declTime: null,
          declBy: null,
          declRetryNum: null,
          auditTime: null,
          auditRemark: null
        }
      }
    },
    methods: {
      open(row) {
        this.dialogVisible = true;
        this.loadDetail(row);
      },
      closedialog() {
        this.dialogVisible = false
      },
      // 获取详情
      loadDetail(row) {
        getPreVehicleRecord(row.id).then((res) => {
          if (res.code == 200) {
            this.form = res.data;
          }
        });
      },
    }
  };
</script>

<style>

</style>
